-
Notifications
You must be signed in to change notification settings - Fork 47
feat: per location server types #558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) now depend on [Locations](https://docs.hetzner.cloud/reference/cloud#locations). - We added a new `locations` property to the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The new property defines a list of supported [Locations](https://docs.hetzner.cloud/reference/cloud#locations) and additional per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) details such as deprecations information. - We deprecated the `deprecation` property from the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The property will gradually be phased out as per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecations are being announced. Please use the new per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecation information instead. See our [changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types) for more details. **Upgrading** ```py def validate_server_type(server_type: ServerType): if server_type.deprecation is not None: raise ValueError(f"server type {server_type.name} is deprecated") ``` ```py def validate_server_type(server_type: ServerType, location: Location): found = [o for o in server_type.locations if location.name == o.location.name] if not found: raise ValueError( f"server type {server_type.name} is not supported in location {location.name}" ) server_type_location = found[0] if server_type_location.deprecation is not None: raise ValueError( f"server type {server_type.name} is deprecated in location {location.name}" ) ```
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #558 +/- ##
==========================================
+ Coverage 96.57% 96.60% +0.03%
==========================================
Files 64 64
Lines 2946 2974 +28
==========================================
+ Hits 2845 2873 +28
Misses 101 101 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
lukasmetzner
approved these changes
Sep 25, 2025
jooola
pushed a commit
that referenced
this pull request
Sep 26, 2025
<!-- section-start changelog --> [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) now depend on [Locations](https://docs.hetzner.cloud/reference/cloud#locations). - We added a new `locations` property to the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The new property defines a list of supported [Locations](https://docs.hetzner.cloud/reference/cloud#locations) and additional per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) details such as deprecations information. - We deprecated the `deprecation` property from the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The property will gradually be phased out as per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecations are being announced. Please use the new per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecation information instead. See our [changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types) for more details. **Upgrading** ```py # Before def validate_server_type(server_type: ServerType): if server_type.deprecation is not None: raise ValueError(f"server type {server_type.name} is deprecated") ``` ```py # After def validate_server_type(server_type: ServerType, location: Location): found = [o for o in server_type.locations if location.name == o.location.name] if not found: raise ValueError( f"server type {server_type.name} is not supported in location {location.name}" ) server_type_location = found[0] if server_type_location.deprecation is not None: raise ValueError( f"server type {server_type.name} is deprecated in location {location.name}" ) ``` ### Features - per location server types (#558) <!-- section-end changelog --> --- <details> <summary><h4>PR by <a href="https://github.com/apricote/releaser-pleaser">releaser-pleaser</a> 🤖</h4></summary> If you want to modify the proposed release, add you overrides here. You can learn more about the options in the docs. ## Release Notes ### Prefix / Start This will be added to the start of the release notes. ~~~~rp-prefix [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) now depend on [Locations](https://docs.hetzner.cloud/reference/cloud#locations). - We added a new `locations` property to the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The new property defines a list of supported [Locations](https://docs.hetzner.cloud/reference/cloud#locations) and additional per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) details such as deprecations information. - We deprecated the `deprecation` property from the [Server Types](https://docs.hetzner.cloud/reference/cloud#server-types) resource. The property will gradually be phased out as per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecations are being announced. Please use the new per [Locations](https://docs.hetzner.cloud/reference/cloud#locations) deprecation information instead. See our [changelog](https://docs.hetzner.cloud/changelog#2025-09-24-per-location-server-types) for more details. **Upgrading** ```py # Before def validate_server_type(server_type: ServerType): if server_type.deprecation is not None: raise ValueError(f"server type {server_type.name} is deprecated") ``` ```py # After def validate_server_type(server_type: ServerType, location: Location): found = [o for o in server_type.locations if location.name == o.location.name] if not found: raise ValueError( f"server type {server_type.name} is not supported in location {location.name}" ) server_type_location = found[0] if server_type_location.deprecation is not None: raise ValueError( f"server type {server_type.name} is deprecated in location {location.name}" ) ``` ~~~~ ### Suffix / End This will be added to the end of the release notes. ~~~~rp-suffix ~~~~ </details> Co-authored-by: Hetzner Cloud Bot <>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Server Types now depend on Locations.
We added a new
locationsproperty to the Server Types resource. The new property defines a list of supported Locations and additional per Locations details such as deprecations information.We deprecated the
deprecationproperty from the Server Types resource. The property will gradually be phased out as per Locations deprecations are being announced. Please use the new per Locations deprecation information instead.See our changelog for more details.
Upgrading